home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / dsp / dr.bub / 96000.lha / 96000 / appb / b133e.asm < prev    next >
Assembly Source File  |  1992-04-28  |  1KB  |  25 lines

  1. ; This program was originally published in the Motorola DSP96002 Users Manual
  2. ; and is provided under a DISCLAIMER OF WARRANTY available from Motorola DSP
  3. ; Operation, 6501 William Cannon Drive West, Austin, Texas 78735-8598.  For
  4. ; more information, refer to the DSP96002 Users Manual, Appendix B, DSP
  5. ; Benchmarks.
  6. ;
  7. ; B.1.33.5    Four Point Polygon Accept/Reject (looped)
  8. ;                   Polygon Accept/Reject
  9. ;                                                          Program  Icycles
  10. ;                                                          Words
  11.   ori   #$e0,ccr          ;set accept/reject/overflow bits   1     1
  12.   move         x:(r0)+n0,d0.s y:(r4)+,d1.s ;get x0,Xmin      1     1
  13.  
  14.   do    #3,clip                                              2     3
  15.   fcmp  d1,d0  x:(r0)+n0,d0.s              ;d0-Dmin, get d1  1     1
  16.   fcmp  d1,d0  x:(r0)+n0,d0.s              ;d1-Dmin, get d2  1     1
  17.   fcmp  d1,d0  x:(r0)-n0,d0.s              ;d2-Dmin, get d3  1     1
  18.   fcmpg d1,d0                 y:(r4)+,d1.s ;d3-Dmin, Dmax    1     1
  19.   fcmp  d0,d1  x:(r0)-n0,d0.s              ;Dmax-x3, get d2  1     1
  20.   fcmp  d0,d1  x:(r0)-n0,d0.s              ;Dmax-x2, get d1  1     1
  21.   fcmp  d0,d1  x:(r0)+,d0.s                ;Dmax-x1, get d0  1     1
  22.   fcmpg d0,d1  x:(r0)+n0,d0.s y:(r4)+,d1.s ;Dmax-x0, d0,Dmin 1     1
  23. clip                                       ;                 ---   ---
  24.                                            ;         Totals:  12    26
  25.